package com.ltkj.shop.controller.mobile;

import com.ltkj.common.core.web.controller.BaseController;
import com.ltkj.common.core.web.page.TableDataInfo;
import com.ltkj.shop.domain.ShopHotelRoomType;
import com.ltkj.shop.service.IShopHotelRoomTypeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 移动端酒店房间类型Controller
 * 
 * @author xupf
 * @date 2023-10-07
 */
@Api(tags = "酒店房间类型移动端接口")
@RestController
@RequestMapping("/mobile/roomType")
public class ShopHotelRoomTypeMobileController extends BaseController
{
    @Autowired
    private IShopHotelRoomTypeService shopHotelRoomTypeService;

    /**
     * 根据酒店ID查询全部房间类型
     */
    @ApiOperation("根据酒店ID查询全部房间类型")
    @GetMapping("/list/{hotelId}")
    public TableDataInfo list(@PathVariable("hotelId") Long hotelId)
    {
        ShopHotelRoomType shopHotelRoomType = new ShopHotelRoomType();
        shopHotelRoomType.setHotelId(hotelId);
        List<ShopHotelRoomType> list = shopHotelRoomTypeService.selectShopHotelRoomTypeList(shopHotelRoomType);
        return getDataTable(list);
    }

}
